Field of the Invention
The present invention relates to an image processing apparatus configured to correct an image in which a brightness defect has occurred.
Description of the Related Art
If an image capturing apparatus such as a camera captures an image of a person's face by emitting a flash, the flash causes a tone defect phenomenon in which the person's pupils appear red (red-eye phenomenon) to occur. In order to address this, many techniques for correcting an image in which a red-eye phenomenon has occurred and adjusting it to its original tone have been proposed. For example, JP 2007-235531A discloses a digital camera according to which a region in which red-eye has occurred is detected in a captured image and tone correction is performed on the region.
Halation is an example of a phenomenon other than the red-eye phenomenon. Halation is a phenomenon in which blown-out highlights appear in a pupil due to the flash being reflected strongly in the pupil. When halation occurs, tone brightness information and iris pattern information are lost, and therefore cannot be corrected with processing similar to that of red-eye correction.
For example, for correcting halation, JP 4537142B discloses an image processing method of separately extracting a region in which red-eye has occurred and a region in which halation has occurred, and subjecting them to correction using respectively different methods.
JP 2007-235531A and JP 4537142B are examples of background art.
In the method disclosed in JP 4537142B, pixels having a brightness value greater than or equal to a threshold value are extracted from a region in which a tone defect has occurred, and it is determined that halation has occurred in the pixels.
However, when determining the occurrence of halation using a fixed threshold value, incorrect determination is likely to occur. In other words, if all of the pixels are brighter, the number of pixels having brightness values greater than or equal to the threshold value will increase, and therefore there is a risk that it will be determined that halation has occurred even if halation has not occurred. The inverse is similarly true, in that if the entire image is underexposed and dark, there is a risk that no brightness values will exceed the threshold value and it will consequently be determined that halation has not occurred, even if halation has occurred.
This occurs not only due to the lightness or darkness of the image, but also due to individual differences between imaged people. For example, in the case of an iris with a light color such as blue, the brightness values of the pixels will be higher compared to the case of an iris with a dark color such as brown. In other words, the probability of a determination that halation has occurred will increase even if the state of halation is the same.